/**
 * 项目名称: Topic_1379.cpp
 * 项目路径: study/DataStructure/LeetCode/树/简单
 * 编辑时间: 2024年08月14日07时36分07秒
 * 用   户: 轻尘
 */

#include <bits/stdc++.h>

using namespace std;

struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;

    TreeNode() : val(0), left(nullptr), right(nullptr) {}

    TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}

    TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};

class Solution {
public:
    TreeNode *p;
    void pre(TreeNode* cloned,TreeNode* target){
        if(cloned){
            if(cloned->val == target->val
            &&cloned->right == target->right
            &&cloned->left == target->left){
                p = cloned;
                return;
            }
            pre(cloned->left,target);
            pre(cloned->right,target);
        }
    }
    TreeNode* getTargetCopy(TreeNode* original, TreeNode* cloned, TreeNode* target) {
        pre(cloned,target);
        return p;
    }
};

int main() {

    return 0;
}
